﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhiJiao.Service.Dto;

namespace ZhiJiao.Service.Abstracts
{
    public interface IEvaluationService
    {
        Task<BackJson> GetEvaluationList(string? filterName);

        // 测评保存
        Task<BackJson> Save(EvaluationDto dto);

        // 提交测评
        Task<BackJson> Submit(EvaluationDto evalDto);

        // 创建测评
        Task<BackJson> CreateEvaluation();

        // 删除测评
        Task<BackJson> DeleteEvaluationg(long id);

        // 获取测评
        Task<BackJson> GetEval(long id);

        /// <summary>
        /// 上传图片
        /// </summary>
        /// <param name="eavlId">测评ID</param>
        /// <param name="actionType">mainImage、listIamge、detailIamges</param>
        Task<BackJson> UploadImage(long eavlId, string actionType);

        // 删除图拍(列表图、主图轮播图、详情图)
        Task<BackJson> DeleteImageAsync(long id, string actionType);

        // 获取测试中所有测试模块
        Task<BackJson> GetEvaluationParts(long id);

        // 获取测试题
        Task<BackJson> GetQuestion(long id);

        // 获取测试模块
        Task<BackJson> GetEvalPart(long id);

        // 保存测试模块(添加、新建)
        Task<BackJson> SavePart(EvaluationPartDto part, string actionType);

        // 删除测评模块
        Task<BackJson> DeletePart(long id);

        // 保存测试题
        Task<BackJson> SaveQuestion(QuestionDto dto, string actionType);

        // 获取模块测试题集合
        Task<BackJson> GetPartQuestions(long partId);

        // 选项保存
        Task<BackJson> SaveOption(OptionDto dto);

        // 获取问题选项集合
        Task<BackJson> GetQuestionOptions(long questionId);

        // 获取选项
        Task<BackJson> GetOption(long id);

        // 删除测试题
        Task<BackJson> DeleteQuestion(long id);

        // 删除选项
        Task<BackJson> DeleteOption(long id);

        // 生成选项标签
        Task<BackJson> GenerateOptionLabel(long questionId);

        // 实时修改测试题答案
        Task<BackJson> SaveQuestionResult(long questionId, string ids);

        // 获取机构参与规则集合
        Task<BackJson> GetInsRules(long insId, long evalId);

        // 从测评移除参与规则
        Task<BackJson> RemoveRuleFromEval(long evalId, long ruleId);

        // 将参与规则加入测评
        Task<BackJson> AddRuleToEval(long evalId, long ruleId);
    }
}
